package com.house.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.house.biz.HouseBiz;
import com.house.dao.HouseDao;
import com.house.entity.House;

@Service("houseBiz")
public class HouseBizImpl implements HouseBiz {
	@Autowired
	private HouseDao dao;
	
	@Override
	public List<House> getAllHouses() {
		return dao.getAllHouses();
	}

	@Override
	public House getHouseById(int id) {
		return dao.getHouseById(id);
	}

	@Override
	public List<House> getHousesByDistrict(int dId) {
		return dao.getHousesByDistrict(dId);
	}

	@Override
	public void addHouse(House house) {
		dao.addHouse(house);
		
	}

	@Override
	public void deleteHouse(int id) {
		dao.deleteHouse(id);
		
	}

	@Override
	public void updateHouse(House house) {
		dao.updateHouse(house);
		
	}

	@Override
	public List<House> gethousesByConditions(int districtId, int streetId,
			int typeId,String topic) {
		// TODO Auto-generated method stub
		return dao.gethousesByConditions(districtId, streetId, typeId,topic);
	}
	
}
